package com.ruoyi.activiti.controller;

import com.ruoyi.activiti.service.AssigneeService;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author danghf
 * @version 1.0
 * @date 2024/05/09 14:14
 * 这个controller负责处理任务的分配，提供一些选项
 */
@RestController
@RequestMapping("/assignee")
public class AssigneeController {

    private final AssigneeService assigneeService;

    public AssigneeController(AssigneeService assigneeService) {
        this.assigneeService = assigneeService;
    }

    /**
     * 获取用户列表
     * @param user 筛选条件
     */
    @GetMapping("/selectOptionsByUser")
    public List<?> getAssigneeUserList(SysUser user){
        return assigneeService.selectOptionsByUser(user);
    }
}
